﻿///<copyright>
/// Copyright © 2009 Stephen Styrchak. All Rights Reserved.
///</copyright>
using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace Ferpect.ComponentModel
{
    public interface IGameLoop
    {
        ContentManager Content { get; set; }
        GraphicsDevice GraphicsDevice { get; }
        TimeSpan InactiveSleepTime { get; set; }
        bool IsActive { get; }
        bool IsFixedTimeStep { get; set; }
        bool IsMouseVisible { get; set; }
        GameServiceContainer Services { get; }
        TimeSpan TargetElapsedTime { get; set; }
        GameWindow Window { get; }

        event EventHandler<EventArgs> Activated;
        event EventHandler<GameComponentCollectionEventArgs> ComponentAdded;
        event EventHandler<GameComponentCollectionEventArgs> ComponentRemoved;
        event EventHandler<EventArgs> Deactivated;
        event EventHandler<EventArgs> Exiting;

        void AddComponent(IGameComponent component);
        void EnableGamerServices();
        void Exit();
        void RemoveComponent(IGameComponent component);
        void ResetElapsedTime();
        void SuppressDraw();
        void Tick();
    }
}
